package com.tianzeculture.stagebao.popwindow;

import android.support.annotation.LayoutRes;
import android.support.annotation.Nullable;
import android.view.View;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.tianzeculture.stagebao.R;

import java.util.List;

/**
 * Created by Administrator on 2018/8/27.
 */

public class PopWindowSelectAdapter extends BaseQuickAdapter<String, BaseViewHolder> {
    public PopWindowSelectAdapter(@LayoutRes int layoutResId, @Nullable List<String> data) {
        super(layoutResId, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, final String item) {
        helper.setText(R.id.tvItem, item);
        helper.setOnClickListener(R.id.llItemSelect, new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                litenner.onClick(item);
            }
        });
    }

    SelectLitenner litenner;

    public void setLitenner(SelectLitenner litenner) {
        this.litenner = litenner;
    }

    public interface SelectLitenner {
        void onClick(String item);
    }
}
